Skip to content

turbo: SAMx5x boards loader enable native .mpy default - #11356

Merged
dhalbert merged 5 commits into
adafruit:mainfrom
mikeysklar:load-native-samx5x
Sep 15, 2026
Merged

dhalbert merged 5 commits into
adafruit:mainfrom
mikeysklar:load-native-samx5x

Conversation

@mikeysklar

@mikeysklar mikeysklar commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

What

Enables the turbo loader (CIRCUITPY_LOAD_NATIVE) by default on SAMx5x.

38 of 42 boards fit. The other 4 opt out in mpconfigboard.mk.

Follow-up to #11332 (RP2) and #11355 (STM32F4).

Hardware tested

Metro M4 AirLift Lite

10.3.0-66-g55984e753c, which includes this commit.

Board vsum bytecode vsum viper .mpy pixels viper .mpy pixels @native .mpy
Metro M4 AirLift Lite 156.1 ms 10.1 ms 463 ms 3,570 ms

How I tested it

All 42 SAMx5x boards built in their tightest CI language with GCC 15.2.1.

Hardware used vsum.py from #11332 plus pixels.py.

Tightest boards with the loader Language Flash free with the loader
mini_sam_m4 ja 220 B
monster_m4sk ja 240 B
metro_m4_express de_DE 772 B
feather_m4_express de_DE 852 B
circuitbrains_deluxe_m4 ja 1,140 B
datalore_ip_m4 ja 1,144 B
silicognition-m4-shim ja 1,240 B
openbook_m4 ja 1,328 B
other 30 boards 2.3 to 630 KB
Opt-outs Language Over by with the loader
hallowing_m4_express ja 120 B
pewpew_m4 de_DE 300 B
kicksat-sprite ru 612 B
uartlogger2 ja 1,032 B

Scope

nRF52 and Xtensa loader support will be separate PRs. SAMD21 does not currently fit.

AI assistance

Claude Code was used.

Turn on CIRCUITPY_LOAD_NATIVE for SAMD51, SAME51 and SAME54 boards. It
fits on every board except these ten, which already have little flash to
spare and opt out in their own mpconfigboard.mk:

  circuitbrains_deluxe_m4, datalore_ip_m4, hallowing_m4_express,
  kicksat-sprite, mini_sam_m4, monster_m4sk, openbook_m4, pewpew_m4,
  silicognition-m4-shim, uartlogger2

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
dhalbert
dhalbert previously approved these changes Sep 13, 2026

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I will work on some translation shrink stuff which may make a lot of these fit again.

@dhalbert

Copy link
Copy Markdown
Collaborator

merge conflicts

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@mikeysklar

Copy link
Copy Markdown
Collaborator Author

Merged main to resolve the conflicts in a12e791, no rebase. After the v1.29 merge two boards no longer fit in fr with the loader on, so CI will show them red:

Board Language Before merge After merge Loader off
metro_m4_express fr 300 B free 152 B over 1,604 B free
feather_m4_express fr 316 B free 136 B over 1,624 B free

I have not opted them out yet. If your translation shrink lands first they should fit again, otherwise I will add CIRCUITPY_LOAD_NATIVE = 0 to those two. Retested on a Metro M4 AirLift Lite at a12e791, results unchanged.

@dhalbert

Copy link
Copy Markdown
Collaborator

I will wait for translation shrinks before merging this.

dhalbert
dhalbert previously approved these changes Sep 15, 2026
@dhalbert
dhalbert enabled auto-merge September 15, 2026 14:28
@dhalbert
dhalbert disabled auto-merge September 15, 2026 14:38
@dhalbert
dhalbert enabled auto-merge September 15, 2026 15:28
@dhalbert
dhalbert disabled auto-merge September 15, 2026 15:33
The translation shrink leaves room for the loader on
circuitbrains_deluxe_m4, datalore_ip_m4, mini_sam_m4, monster_m4sk,
openbook_m4 and silicognition-m4-shim. Four boards still opt out:

  hallowing_m4_express, kicksat-sprite, pewpew_m4, uartlogger2

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@mikeysklar

Copy link
Copy Markdown
Collaborator Author

Main now has the translation shrink, so six of the ten opt-outs fit again and are removed in f6fbfdf. Tightest language with the loader on:

Board Language Free with the loader
mini_sam_m4 ja 220 B
monster_m4sk ja 240 B
circuitbrains_deluxe_m4 ja 1,140 B
datalore_ip_m4 ja 1,144 B
silicognition-m4-shim ja 1,240 B
openbook_m4 ja 1,328 B

metro_m4_express and feather_m4_express fit again too (772 and 852 B free in de_DE).

Still opted out: hallowing_m4_express, kicksat-sprite, pewpew_m4, uartlogger2.

@dhalbert dhalbert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - the more the better.

@dhalbert
dhalbert enabled auto-merge September 15, 2026 15:47
@dhalbert
dhalbert added this pull request to the merge queue Sep 15, 2026
Merged via the queue into adafruit:main with commit 6799131 Sep 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants